<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <title>采集-6</title>
        <link
            rel="stylesheet"
            href="../../../layui/css/layui.css"
            media="all"
        />
        <script src="../../../js/jquery/3.5.1/jquery.js"></script>
        <script src="../../../layui/layui.js" charset="utf-8"></script>
        <script src="../../../js/config.js"></script>
        <script src="../../../js/public.js"></script>
        <script src="../../../js/function.js"></script>
        <!-- debug -->
        <!-- <script src="./1.js"></script> -->
        <link rel="stylesheet" href="../../../css/public.css" />
        <link rel="stylesheet" href="../../../css/patient/qss.css" />
        <style>
            .picBox {
                position: relative;
            }

            .btnUpload {
                width: 104px;
                height: 104px;
                position: relative;
                float: left;
                background: url(../../../img/shangchuanzhaopian.png) no-repeat;
                overflow: hidden;
                text-decoration: none;
                text-indent: 0;
            }

            .btnUpload input {
                position: absolute;
                width: 100px;
                height: 100px;
                right: 0;
                top: 0;
                opacity: 0;
            }

            .picList {
                float: left;
            }

            .picItem {
                width: 104px;
                height: 104px;
                text-align: center;
                display: inline-block;
                margin-right: 10px;
                border: 1px solid #ccc;
                border-radius: 5px;
                float: left;
                position: relative;
            }

            .picItem .pic {
                max-width: 100%;
                max-height: 100%;
                width: 104px;
                height: 104px;
                cursor: pointer;
            }

            .picItem .close1 {
                position: absolute;
                right: 2px;
                top: 2px;
                z-index: 1000;
                background: url("../../../img/cuowu.png") no-repeat;
                cursor: pointer;
                width: 20px;
                height: 20px;
            }

            .date {
                width: 80px !important;
                text-align: center;
            }

            .layui-table .layui-input {
                border: 1px #d2d2d2 solid !important;
                height: 30px !important;
            }

            .qss-item-table .layui-table td {
                padding: 10px;
            }
        </style>
    </head>

    <body>
        <div class="container">
            <div class="tab-title">
                <ul class="tab-title-tab">
                    <li>
                        <a href="../V1_1/patient_info.html">
                            <p>基本信息</p>
                            <p class="complete_basic">0%</p>
                        </a>
                    </li>
                    <li class="tab-curr">
                        <a>
                            <p>病历采集</p>
                            <p class="complete_qss">0%</p>
                        </a>
                    </li>
                    <li>
                        <a href="./qss7.html">
                            <p>检查信息</p>
                            <p style="display: none">0%</p>
                        </a>
                    </li>
                    <div class="clear"></div>
                </ul>
            </div>
            <div class="qss-container">
                <div class="qss-box">
                    <div class="qss-box-title">
                        <p>垂体疾病治疗</p>
                    </div>
                    <form class="layui-form qss-form">
                        <div class="qss-item">
                            <div
                                class="qss-form-item layui-form-item switch-line"
                            >
                                <div class="qss-item-title layui-input-inline">
                                    <p>1、是否进行垂体疾病治疗？</p>
                                </div>
                                <div
                                    class="layui-input-inline qss-input-swipch"
                                >
                                    <div
                                        class="switch3"
                                        id="switch-206"
                                        data-qid="206"
                                        title="是|否"
                                        option="0|1|2"
                                    ></div>
                                    <!--<input type="checkbox" name="q206" value="1" data-qid="206" lay-skin="switch" lay-filter="switch2" lay-text="是|否">-->
                                </div>
                            </div>
                            <!-- <div class="qss-form-item layui-form-item" id="opn-206"> -->
                            <div
                                class="qss-form-item layui-form-item"
                                id="opn-206"
                                style="display: none"
                            >
                                <!-- <div
                                class="qss-form-item layui-form-item"
                                id="opn-206"
                                style="display: block"
                            > -->
                                <div
                                    class="qss-form-item-checkbox layui-form-item"
                                >
                                    <input
                                        type="checkbox"
                                        lay-skin="primary"
                                        title="随访观察"
                                        name="153"
                                        class="cv-15301"
                                        value="15301"
                                        lay-filter="check1"
                                    />
                                    <input
                                        type="checkbox"
                                        lay-skin="primary"
                                        title="手术治疗"
                                        name="153"
                                        id="operation"
                                        class="cv-15302"
                                        value="15302"
                                        lay-filter="check1"
                                    />
                                    <input
                                        type="checkbox"
                                        lay-skin="primary"
                                        title="放射治疗"
                                        id="radiation"
                                        name="153"
                                        class="cv-15303"
                                        value="15303"
                                        lay-filter="check1"
                                    />
                                    <input
                                        type="checkbox"
                                        lay-skin="primary"
                                        title="药物治疗"
                                        name="153"
                                        class="cv-15304"
                                        value="15304"
                                        lay-filter="check1"
                                    />
                                </div>
                            </div>
                        </div>
                        <!-- 2 手术治疗 -->
                        <div class="qss-item ss-15302" style="display: none">
                            <div class="qss-item-title">
                                <p>2、垂体手术治疗情况：</p>
                            </div>
                            <div class="qss-form-item layui-form-item">
                                <div class="layui-form-label">a.手术次数</div>
                                <div
                                    class="qss-form-item-radio layui-form-item"
                                >
                                    <input
                                        type="radio"
                                        lay-skin="primary"
                                        title="1次"
                                        name="154"
                                        class="cv-15401"
                                        value="15401"
                                        lay-filter="radio1"
                                    />
                                    <input
                                        type="radio"
                                        lay-skin="primary"
                                        title="2次"
                                        name="154"
                                        class="cv-15402"
                                        value="15402"
                                        lay-filter="radio1"
                                    />
                                    <input
                                        type="radio"
                                        lay-skin="primary"
                                        title="3次"
                                        name="154"
                                        class="cv-15403"
                                        value="15403"
                                        lay-filter="radio1"
                                    />
                                    <input
                                        type="radio"
                                        lay-skin="primary"
                                        title="3次及以上"
                                        name="154"
                                        class="cv-15404"
                                        value="15404"
                                        lay-filter="radio1"
                                    />
                                </div>
                            </div>
                            <div class="qss-form-item layui-form-item">
                                <div class="layui-form-label">b.手术信息</div>
                                <div class="qss-item-table">
                                    <table
                                        class="layui-table"
                                        lay-even
                                        lay-skin=""
                                        style="border: 1px solid #cccccc"
                                    >
                                        <tbody>
                                            <tr>
                                                <th style="width: 10%">序号</th>
                                                <th style="width: 20%">
                                                    手术时间
                                                </th>
                                                <th style="width: 35%">
                                                    手术名称
                                                </th>
                                                <th style="width: 35%">
                                                    手术效果判定
                                                </th>
                                            </tr>
                                            <tr class="r154-1 hide">
                                                <td>1</td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input-date js-date1"
                                                        autocomplete="off"
                                                        id="15501"
                                                    />
                                                </td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input js-rowInput"
                                                        autocomplete="off"
                                                        id="15502"
                                                    />
                                                </td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input js-rowInput"
                                                        autocomplete="off"
                                                        id="15503"
                                                    />
                                                </td>
                                            </tr>
                                            <tr class="r154-1 r154-2 hide">
                                                <td>2</td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input-date js-date2"
                                                        autocomplete="off"
                                                        id="15504"
                                                    />
                                                </td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input js-rowInput"
                                                        autocomplete="off"
                                                        id="15505"
                                                    />
                                                </td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input js-rowInput"
                                                        autocomplete="off"
                                                        id="15506"
                                                    />
                                                </td>
                                            </tr>
                                            <tr
                                                class="r154-1 r154-2 r154-3 hide"
                                            >
                                                <td>3</td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input-date js-date3"
                                                        autocomplete="off"
                                                        id="15507"
                                                    />
                                                </td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input js-rowInput"
                                                        autocomplete="off"
                                                        id="15508"
                                                    />
                                                </td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input js-rowInput"
                                                        autocomplete="off"
                                                        id="15509"
                                                    />
                                                </td>
                                            </tr>
                                            <tr
                                                class="r154-1 r154-2 r154-3 r154-4 hide"
                                            >
                                                <td>4</td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input-date js-date4"
                                                        autocomplete="off"
                                                        id="15510"
                                                    />
                                                </td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input js-rowInput"
                                                        autocomplete="off"
                                                        id="15511"
                                                    />
                                                </td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input js-rowInput"
                                                        autocomplete="off"
                                                        id="15512"
                                                    />
                                                </td>
                                            </tr>
                                            <tr
                                                class="r154-1 r154-2 r154-3 r154-4 hide"
                                            >
                                                <td>5</td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input-date js-date5"
                                                        autocomplete="off"
                                                        id="15513"
                                                    />
                                                </td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input js-rowInput"
                                                        autocomplete="off"
                                                        id="15514"
                                                    />
                                                </td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input js-rowInput"
                                                        autocomplete="off"
                                                        id="15515"
                                                    />
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>

                        <!-- 2 放射治疗 -->
                        <div class="qss-item fs-15303" style="display: none">
                            <div class="qss-item-title">
                                <p>2、垂体疾病放射治疗情况：</p>
                            </div>
                            <div class="qss-form-item layui-form-item">
                                <div class="layui-form-label">
                                    a.放射治疗次数
                                </div>
                                <div
                                    class="qss-form-item-radio layui-form-item"
                                >
                                    <input
                                        type="radio"
                                        lay-skin="primary"
                                        title="1次"
                                        name="157"
                                        class="cv-15701"
                                        value="15701"
                                        lay-filter="radio1"
                                    />
                                    <input
                                        type="radio"
                                        lay-skin="primary"
                                        title="2次"
                                        name="157"
                                        class="cv-15702"
                                        value="15702"
                                        lay-filter="radio1"
                                    />
                                    <input
                                        type="radio"
                                        lay-skin="primary"
                                        title="3次"
                                        name="157"
                                        class="cv-15703"
                                        value="15703"
                                        lay-filter="radio1"
                                    />
                                    <input
                                        type="radio"
                                        lay-skin="primary"
                                        title="3次及以上"
                                        name="157"
                                        class="cv-15704"
                                        value="15704"
                                        lay-filter="radio1"
                                    />
                                </div>
                            </div>
                            <div class="qss-form-item layui-form-item">
                                <div class="layui-form-label">b.放射治疗信息</div>
                                <div class="qss-item-table">
                                    <table
                                        class="layui-table"
                                        lay-even
                                        lay-skin=""
                                        style="border: 1px solid #cccccc"
                                    >
                                        <tbody>
                                            <tr>
                                                <th style="width: 10%">序号</th>
                                                <th style="width: 20%">
                                                    放射治疗时间
                                                </th>
                                                <th style="width: 35%">
                                                    放射治疗名称
                                                </th>
                                                <th style="width: 35%">
                                                    放射治疗效果判定
                                                </th>
                                            </tr>
                                            <tr class="r157-1 hide">
                                                <td>1</td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input-date js-date6"
                                                        autocomplete="off"
                                                        id="15801"
                                                    />
                                                </td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input js-rowInput"
                                                        autocomplete="off"
                                                        id="15802"
                                                    />
                                                </td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input js-rowInput"
                                                        autocomplete="off"
                                                        id="15803"
                                                    />
                                                </td>
                                            </tr>
                                            <tr class="r157-1 r157-2 hide">
                                                <td>2</td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input-date js-date7"
                                                        autocomplete="off"
                                                        id="15804"
                                                    />
                                                </td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input js-rowInput"
                                                        autocomplete="off"
                                                        id="15805"
                                                    />
                                                </td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input js-rowInput"
                                                        autocomplete="off"
                                                        id="15806"
                                                    />
                                                </td>
                                            </tr>
                                            <tr
                                                class="r157-1 r157-2 r157-3 hide"
                                            >
                                                <td>3</td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input-date js-date8"
                                                        autocomplete="off"
                                                        id="15807"
                                                    />
                                                </td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input js-rowInput"
                                                        autocomplete="off"
                                                        id="15808"
                                                    />
                                                </td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input js-rowInput"
                                                        autocomplete="off"
                                                        id="15809"
                                                    />
                                                </td>
                                            </tr>
                                            <tr
                                                class="r157-1 r157-2 r157-3 r157-4 hide"
                                            >
                                                <td>4</td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input-date js-date9"
                                                        autocomplete="off"
                                                        id="15810"
                                                    />
                                                </td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input js-rowInput"
                                                        autocomplete="off"
                                                        id="15811"
                                                    />
                                                </td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input js-rowInput"
                                                        autocomplete="off"
                                                        id="15812"
                                                    />
                                                </td>
                                            </tr>
                                            <tr
                                                class="r157-1 r157-2 r157-3 r157-4 hide"
                                            >
                                                <td>5</td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input-date js-date10"
                                                        autocomplete="off"
                                                        id="15813"
                                                    />
                                                </td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input js-rowInput"
                                                        autocomplete="off"
                                                        id="15814"
                                                    />
                                                </td>
                                                <td>
                                                    <input
                                                        type="text"
                                                        class="layui-input table-input js-rowInput"
                                                        autocomplete="off"
                                                        id="15815"
                                                    />
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <!--<div class="qss-form-item layui-form-item">
                        <div class="layui-form-label">b.肾上腺CT</div>
                        <div class="qss-form-item layui-form-item">
                            <div class="qss-item-table">
                                <table class="layui-table" lay-even lay-skin="" style="border:1px solid #cccccc;">
                                    <tbody>
                                    <tr>
                                        <th style="width:10%;">序号</th>
                                        <th style="width:20%">放射治疗时间</th>
                                        <th style="width:35%">治疗部位和剂量</th>
                                        <th style="width:35%;">效果判定</th>
                                    </tr>
                                    <tr class="r157-1">
                                        <td>1</td>
                                        <td><input type="text" class="layui-input table-input-date js-date6" id="15801"></td>
                                        <td><input type="text" class="layui-input table-input js-rowInput" id="15802"></td>
                                        <td><input type="text" class="layui-input table-input js-rowInput" id="15803"></td>
                                    </tr>
                                    <tr class="r157-1 r157-2">
                                        <td>2</td>
                                        <td><input type="text" class="layui-input table-input-date js-date7" id="15804"></td>
                                        <td><input type="text" class="layui-input table-input js-rowInput" id="15805"></td>
                                        <td><input type="text" class="layui-input table-input js-rowInput" id="15806"></td>
                                    </tr>
                                    <tr class="r157-1 r157-2 r157-3">
                                        <td>3</td>
                                        <td><input type="text" class="layui-input table-input-date js-date8" id="15807"></td>
                                        <td><input type="text" class="layui-input table-input js-rowInput" id="15808"></td>
                                        <td><input type="text" class="layui-input table-input js-rowInput" id="15809"></td>
                                    </tr>
                                    <tr class="r157-1 r157-2 r157-3 r157-4">
                                        <td>4</td>
                                        <td><input type="text" class="layui-input table-input-date js-date9" id="15810"></td>
                                        <td><input type="text" class="layui-input table-input  js-rowInput" id="15811"></td>
                                        <td><input type="text" class="layui-input table-input  js-rowInput" id="15812"></td>
                                    </tr>
                                    <tr class="r157-1 r157-2 r157-3 r157-4">
                                        <td>5</td>
                                        <td><input type="text" class="layui-input table-input-date js-date10" id="15813"></td>
                                        <td><input type="text" class="layui-input table-input js-rowInput" id="15814"></td>
                                        <td><input type="text" class="layui-input table-input js-rowInput" id="15815"></td>
                                    </tr>

                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>-->
                        </div>

                        <!-- 3、病理报告上传 -->
                        <div
							id="bl_bg"
                            class="qss-item ss-15302 ss-15302-2"
                            style="display: none"
                        >
                            <div class="qss-item-title">
                                <p style="color: #4777e7">3、病理报告上传：</p>
                            </div>
                            <div class="qss-form-item layui-form-item picBox">
                                <div class="picList">
                                    <!--<div class="picItem" data-id="134">
                                <img class="pic" src="../../../img/bingliguanli.png" />
                                <div class="close1"></div>
                            </div>-->
                                </div>
                                <div class="btnUpload" id="btnUpload">
                                    <input
                                        type="file"
                                        id="fileUpload"
                                        accept="image/*"
                                    />
                                </div>
                            </div>
                            <!--v1.1-->
                            <div class="qss-form-item layui-form-item">
                                <div
                                    class="layui-form-label"
                                    style="padding: 9px 0px"
                                >
                                    病理诊断：
                                </div>
                                <div class="layui-form-item">
                                    <textarea
                                        class="layui-textarea cv-15601001"
                                        lay-verify="other_text_max"
                                        lay-verType="tips"
                                        placeholder="请输入病理诊断(最多输入1000字)"
                                        id="15601001-val"
                                        name="15601001"
                                    ></textarea>
                                </div>
                            </div>
                        </div>

                        <div class="qss-item">
                            <div class="qss-item-title">
                                <p>4、术后随访科室：</p>
                            </div>
                            <div class="qss-form-item layui-form-item">
                                <div class="qss-form-item layui-form-item">
                                    <div
                                        class="qss-form-item-radio layui-form-item"
                                    >
                                        <input
                                            type="radio"
                                            lay-skin="primary"
                                            title="内分泌科"
                                            name="159"
                                            class="cv-15901"
                                            value="15901"
                                            lay-filter="radio3"
                                        />
                                        <input
                                            type="radio"
                                            lay-skin="primary"
                                            title="神经外科"
                                            name="159"
                                            class="cv-15902"
                                            value="15902"
                                            lay-filter="radio3"
                                        />
                                        <input
                                            type="radio"
                                            lay-skin="primary"
                                            title="其他"
                                            name="159"
                                            class="cv-15903"
                                            value="15903"
                                            lay-filter="radio3"
                                        />
                                        <input
                                            type="text"
                                            class="layui-input radio-check-input"
                                            lay-verify="other_text"
                                            lay-verType="tips"
                                            autocomplete="off"
                                            disabled="disabled"
                                            id="15903001-val"
                                        />
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="qss-item">
                            <div class="qss-item-title">
                                <p>5、垂体疾病治疗转归：</p>
                            </div>
                            <div class="qss-form-item layui-form-item">
                                <div class="layui-form-label">
                                    a.垂体疾病治疗预后
                                </div>
                                <div
                                    class="qss-form-item-radio layui-form-item"
                                >
                                    <input
                                        type="radio"
                                        lay-skin="primary"
                                        title="缓解状态"
                                        name="160"
                                        class="cv-16001"
                                        value="16001"
                                        lay-filter="radio3"
                                    />
                                    <!--<input type="radio" lay-skin="primary"  title="部分缓解" name="160" class="cv-16002" value="16002" lay-filter="radio3">-->
                                    <input
                                        type="radio"
                                        lay-skin="primary"
                                        title="疾病持续状态"
                                        name="160"
                                        class="cv-16003"
                                        value="16003"
                                        lay-filter="radio3"
                                    />
                                    <input
                                        type="radio"
                                        lay-skin="primary"
                                        title="复发"
                                        name="160"
                                        class="cv-16004"
                                        value="16004"
                                        lay-filter="radio3"
                                    />
                                    <!--v1.1-->
                                    <input
                                        type="radio"
                                        lay-skin="primary"
                                        title="未评估"
                                        name="160"
                                        class="cv-16005"
                                        value="16005"
                                        lay-filter="radio3"
                                    />
                                    <input
                                        type="radio"
                                        lay-skin="primary"
                                        title="不适用"
                                        name="160"
                                        class="cv-16006"
                                        value="16006"
                                        lay-filter="radio3"
                                    />
                                </div>
                            </div>
                            <div class="qss-form-item layui-form-item">
                                <div class="layui-form-label">
                                    b.缓解时间<input
                                        type="text"
                                        name="131001"
                                        disabled="disabled"
                                        lay-verify="other_text_mini"
                                        lay-verType="tips"
                                        lay-filter="input1"
                                        autocomplete="off"
                                        id="huanjieMonth"
                                        class="cv-131"
                                        maxlength="3"
                                    />月
                                </div>
                            </div>
                        </div>

                        <div class="qss-item-btn">
                            <div class="qss-item-btn">
                                <a href="javascript:;">
                                    <button
                                        type="button"
                                        data-type="1"
                                        lay-submit=""
                                        lay-filter="submit-btn"
                                        data-type="1"
                                    >
                                        提交并跳转下一页
                                    </button>
                                </a>
                                <a href="javascript:;">
                                    <button
                                        type="button"
                                        data-type="0"
                                        lay-submit=""
                                        lay-filter="submit-btn"
                                        data-type="0"
                                    >
                                        保存并留在本页
                                    </button>
                                </a>
                                <a href="qss7.html">
                                    <button type="button">
                                        放弃编辑并跳转下一页
                                    </button>
                                </a>
                            </div>
                        </div>
                    </form>
                    <div class="fixed-nav">
                        <ul>
                            <li>
                                <a href="./qss1.html"
                                    ><span>个人疾病史</span
                                    ><span class="complete_qss1"></span>
                                    <div class="clear"></div
                                ></a>
                            </li>
                            <li>
                                <a href="./qss2.html"
                                    ><span>垂体疾病评估</span
                                    ><span class="complete_qss2"></span>
                                    <div class="clear"></div
                                ></a>
                            </li>
                            <li>
                                <a href="./qss3.html"
                                    ><span>垂体疾病用药</span
                                    ><span class="complete_qss3"></span>
                                    <div class="clear"></div
                                ></a>
                            </li>
                            <li>
                                <a href="./qss4.html"
                                    ><span>合并症评估</span
                                    ><span class="complete_qss4"></span>
                                    <div class="clear"></div
                                ></a>
                            </li>
                            <li>
                                <a href="qss5.html"
                                    ><span>合并症用药</span
                                    ><span class="complete_qss5"></span>
                                    <div class="clear"></div
                                ></a>
                            </li>
                            <li class="fixed-nav-curr">
                                <a
                                    ><span>垂体疾病治疗</span
                                    ><span class="complete_qss6"></span>
                                    <div class="clear"></div
                                ></a>
                            </li>
                        </ul>
                        <button
                            type="button"
                            lay-submit=""
                            lay-filter="submit-btn"
                            data-type="1"
                        >
                            提交
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </body>
    <script>
        var patient_id = getLocalStorage("patient_id");
        console.log("user_id", patient_id);
        var templateID = 16;
        //有关问题的数据
        var question = {
            206: [20601, "是", "s1"], //是否进行治疗
            //153:{} , //是否进行垂体疾病治疗 复选
            154: [0, "", "s1"], //治疗次数 2-a
            157: [0, "", "s1"], //4-a
            158: [], //4-b
            159: [0, "", "s1"], //5
            160: [0, "", "s1"], //6-a
            check_list: {},
            huanjie: "", //缓解时间
            suifang: "", //随房科室
            156: [], // 上传图片
            bingli: "", // 病理报告文本
        };

        function initForm(callback) {
            //获取答案,初始化表单
            ajax_get(
                configUrl.qssInfo,
                {
                    user_id: patient_id,
                    visit_level: 1,
                    template_id: templateID,
                },
                (res) => {
                    var arr1 = [154, 157, 159, 160]; //单选
                    $.each(res.data.question_data, function (index, item) {
                        qid = parseInt(item.question_id);
                        if (qid == 206) {
                            console.log(item.answer[0]);
                            if (item.answer.length > 0) {
                                if (item.answer[0].answer_id == qid + "01") {
                                    $("#switch-206").attr("value", 1);
                                    $("#opn-206").show();
                                } else {
                                    $("#switch-206").attr("value", 2);
                                    $("#opn-206").hide();
                                }
                                question[206][0] = item.answer[0].answer_id;
                                question[206][1] = item.answer[0].answer_value;
                            } else {
                                question[206][1] = "";
                            }
                        }

                        //153复选 harvey
                        if (qid == 153) {
                            $.each(item.answer, function (index, item2) {
                                //console.log(item2);
                                $(".cv-" + item2.answer_id).attr(
                                    "checked",
                                    true
                                );
                                question["check_list"][item2.answer_id] =
                                    item2.answer_value;
                                if (item2.answer_id == 15302) {
                                    $(".ss-15302").show();
                                }
                                if (item2.answer_id == 15303) {
                                    //$(".ss-15302").hide();
                                    $(".ss-15302-2").show();
                                    $(".fs-15303").show();
                                    //是否选择手术治疗
                                    var aoperation = document.getElementById('operation');
                                    if (aoperation.checked == true){
                                        console.log('选择了手术治疗,不做操作');
                                    }else{
                                        document.getElementById('bl_bg').style.cssText = "display:none;";
                                    }
                                }
                            });
                        }
                        //单选
                        if (arr1.includes(qid)) {
                            if (item.answer.length > 0) {
                                //console.log(item.answer[0]);
                                if (item.answer[0].answer_id.length < 8) {
                                    $(".cv-" + item.answer[0].answer_id).attr(
                                        "checked",
                                        true
                                    );
                                    question[qid][0] = item.answer[0].answer_id;
                                    question[qid][1] =
                                        item.answer[0].answer_value;
                                }
                            }
                        }
                        //154手术次数信息
                        if (qid == 154) {
                            if (item.answer.length > 0) {
                                init154Row(item.answer[0].answer_id);
                            }
                        }
                        //harvey
                        if (qid == 155) {
                            if (item.answer.length > 0) {
                                $("#" + item.answer[0].answer_id).val(
                                    item.answer[0].answer_value
                                );
                            }
							 $.each(item.answer, function (imdex, item) {
                                $("#" + item.answer_id).val(item.answer_value);
                                question.check_list[item.answer_id] =
                                    item.answer_value;
                            });
                        }
                        if (qid == 157) {
                            if (item.answer.length > 0) {
                                init157Row(item.answer[0].answer_id);
                            }
                        }
                        if (qid == 158) {
                            if (item.answer.length > 0) {
                                $("#" + item.answer[0].answer_id).val(
                                    item.answer[0].answer_value
                                );
                            }
                            $.each(item.answer, function (imdex, item) {
                                $("#" + item.answer_id).val(item.answer_value);
                                question.check_list[item.answer_id] =
                                    item.answer_value;
                            });
                        }
                        if (qid == 160) {
                            if (item.answer.length > 0) {
                                if (
                                    item.subquestion_id == 16001001 ||
                                    item.subquestion_id == 16002001
                                ) {
                                    $("#huanjieMonth").val(
                                        item.answer[0].answer_value
                                    );
                                    $("#huanjieMonth").prop("disabled", false);
                                    question["huanjie"] =
                                        item.answer[0].answer_id;
                                }
                            }
                        }
                        //随访
                        if (qid == 159) {
                            if (item.answer.length > 0) {
                                if (item.answer[0].answer_id == 15903001) {
                                    $("#15903001-val").val(
                                        item.answer[0].answer_value
                                    );
                                    $("#15903001-val").prop("disabled", false);
                                    question["suifang"] = 15903;
                                }
                            }
                        }

                        // v1.1 病理报告文本
                        if (qid == 156) {
                            if (
                                item.subquestion_id == 15601001 &&
                                item.answer.length > 0
                            ) {
                                $("#15601001-val").val(
                                    item.answer[0].answer_value
                                );
                                question["bingli"] = 15601001;
                            }
                        }

                        //上传
                        // if(qid == 156){
                        //     if(item.answer.length > 0){
                        //         $.each(item.answer[0]['answer_value'],function(index,item){
                        //             question[156].push(item.id);
                        //             addPicItem(item.file,item.id);
                        //         })
                        //     }
                        // }
                        if (qid == 156) {
                            if (
                                item.answer.length > 0 &&
                                item.subquestion_id != 15601001
                            ) {
                                $.each(item.answer[0].answer_value, function (
                                    index,
                                    item
                                ) {
                                    question[156].push(item.id);
                                    addPicItem(item.file, item.id);
                                });
                            }
                        }
                    });

                    callback();
                }
            );
        }

        function init154Row(val154) {
            console.log("init154Row", val154);
            $(".r154-1").show();
            if (val154 == 15401) {
                $(".r154-2").hide();
                //$(".r154-3").hide();
                //$(".r154-4").hide();
                $(".r154-2 input").val("");
                //$(".r154-3 input").val('');
                //$(".r154-4 input").val('');
                //for (var r = 15804; r <= 15815; r++) {
                 //   delete question.check_list[r];
                //}
            } else if (val154 == 15402) {
                $(".r154-3").hide();
                //$('.r154-4').hide();
                $(".r154-3 input").val("");
                //$(".r154-4 input").val('');
               //for (var r = 15807; r <= 15815; r++) {
                  // delete question.check_list[r];
                //}
            } else if (val154 == 15403) {
                $(".r154-4").hide();
                $(".r154-4 input").val("");
                // for (var r = 15810; r <= 15815; r++) {
                   // delete question.check_list[r];
                //}
            }
        }

        function init157Row(val) {
            console.log("init157Row", {
                val,
            });

            $(".r157-1").show();
            if (val == 15701) {
                $(".r157-2").hide();
                $(".r157-3").hide();
                $(".r157-4").hide();
            } else if (val == 15702) {
                $(".r157-3").hide();
                $(".r157-4").hide();
            } else if (val == 15703) {
                $(".r157-4").hide();
            }
        }

        function addPicItem(src, id) {
            var randId = Math.floor(Math.random() * 1000);
            var str =
                '<div class="picItem" id="pic-' +
                randId +
                '" data-id="' +
                id +
                '">\n' +
                '<img class="pic" src="' +
                src +
                '" />\n' +
                '<div class="close1"></div> </div>';
            $(".picList").append(str);
        }
        //设置为未进行垂体治疗，删除隐藏项目的值
        function setToNozhiLiao() {
            //15301 第一个的多选
            delete question.check_list[15301];
            delete question.check_list[15302];
            delete question.check_list[15303];
            delete question.check_list[15304];
            //2.a 15402手术次数
            question[154][0] = 0;
            question[154][1] = "";
            //2.b 手术信息
            for (var i = 15801; i <= 15815; i++) {
                question.check_list[i] = "";
            }
            //3.已上传的图片
            question[156] = [];
            //4. 垂体疾病放射治疗情况
            question[157][0] = 0;
            question[157][1] = "";
        }

        $(document).ready(function () {
            var height = $(window).height() - 3;
            $(".container").css("min-height", height);
            $(".qss-container").css("min-height", height - 51);

            //完整度
            getCompletion();
            //删除图片
            $(".picList").on("click", ".close1", function () {
                var picId = $(this).parents(".picItem").attr("data-id");
                console.log("picId=", picId);
                for (var i = 0; i < question[156].length; i++) {
                    if (question[156][i] == picId) {
                        question[156].splice(i, 1);
                    }
                }

                $(this).parents(".picItem").remove();
                console.log(question[156]);
            });
            //预览图片
            $(".picList").on("click", ".pic", function () {
                that = $(this);
                let img = new Image();
                img.src = $(this).attr("src");

                console.log(img.width + ";" + img.height);
                width = img.width;
                height = img.height;
                //if(width>600px;)
                layer.open({
                    type: 1,
                    title: false,
                    closeBtn: 0,
                    area: ["auto"],
                    skin: "layui-layer-nobg", //没有背景色
                    shadeClose: true,
                    content:
                        '<div style="width:' +
                        width +
                        ";height:" +
                        height +
                        ';max-width:600px;max-height:500px;"><img src="' +
                        that.attr("src") +
                        '" width="100%" height="100%" /></div>',
                });
            });
            //上传图片
            $("#fileUpload").change(function () {
                console.log($("#fileUpload")[0].files[0]);
                var fileType = $("#fileUpload")[0].files[0].type;
                if (
                    fileType != "image/jpeg" &&
                    fileType != "image/jpg" &&
                    fileType != "image/png"
                ) {
                    layer.msg("请选择图片文件");
                    return false;
                }

                var fileSize = $("#fileUpload")[0].files[0].size;
                if (fileSize > 10485760) {
                    layer.msg("上传的图片不能超过10M");
                    return false;
                }

                addPicItem(URL.createObjectURL($(this)[0].files[0]), 0);
                //var files = $(this).prop('files');
                //console.log(files);
                let formData = new FormData();
                //formData.append('fileData',$("#fileUpload").prop('files')[0]);
                formData.append("filedata", $("#fileUpload")[0].files[0]);
                formData.append("user_id", patient_id);
                formData.append("doc_id", getLocalStorage("doc_id"));
                formData.append("visit_level", 1);
                var token = getLocalStorage("token");
                var headers = {};
                if (token) {
                    headers.Authorization = "Bearer " + token;
                }
                $.ajax({
                    url: configUrl.host + "/api/v1/pituitary/upload",
                    type: "POST",
                    data: formData,
                    processData: false,
                    cache: false,
                    contentType: false,
                    headers: headers,
                    success: function (res) {
                        console.log(res);
                        if (res.status == 0) {
                            var randId = Math.floor(Math.random() * 1000);
                            question[156].push(res.data.id);
                            $("#pic-" + randId).attr("data-id", res.data.id);
                            console.log(question[156]);
                        }
                    },
                    error: function () {
                        alert("上传失败");
                    },
                });
            });

            layui
                .config({
                    base: "../../../layui/layui_exts/",
                })
                .extend({
                    switch3: "switch3/switch3",
                })
                .use(
                    [
                        "element",
                        "form",
                        "layer",
                        "laydate",
                        "laypage",
                        "switch3",
                    ],
                    function () {
                        var element = layui.element;
                        var form = layui.form;
                        var layer = layui.layer;
                        var laydate = layui.laydate;
                        var laypage = layui.laypage;
                        var switch3 = layui.switch3;
                        initForm(function () {
                            switch3.render({
                                elem: ".switch3",
                                done: function (val) {
                                    console.log({ val });
                                    if (val == 0) {
                                        question[206][0] = 0;
                                        question[206][1] = "";
                                        $("#opn-206").hide();
                                        $(".cv-15301").prop("checked", false);
                                        $(".cv-15302").prop("checked", false);
                                        $(".cv-15303").prop("checked", false);
                                        $(".cv-15304").prop("checked", false);
                                        $(".ss-15302").hide();
                                        $(".fs-15303").hide();
                                        setToNozhiLiao();
                                    } else if (val == 1) {
                                        question[206][0] = 20601;
                                        question[206][1] = "是";
                                        $("#opn-206").show();
                                    } else if (val == 2) {
                                        $("#opn-206").hide();
                                        question[206][0] = 20602;
                                        question[206][1] = "否";
                                        $(".cv-15301").prop("checked", false);
                                        $(".cv-15302").prop("checked", false);
                                        $(".cv-15303").prop("checked", false);
                                        $(".cv-15304").prop("checked", false);
                                        $(".ss-15302").hide();
                                        $(".fs-15303").hide();
                                        setToNozhiLiao();
                                    } else if (val == 3) {
                                        // $('.ss-15302-2').show();
                                    }
                                    form.render();
                                },
                            });
                            form.render();
                        });

                        //时间最大时
                        var now = new Date();
                        var year = parseInt(now.getFullYear());
                        var month = parseInt(now.getMonth() + 1);
                        var day = now.getDate();
                        var max_date = year + "-" + month + "-" + day;
                        var max_date_month = year + "-" + month;
                        //switch3

                        //手术时间-治疗时间
                        laydate.render({
                            elem: ".js-date1",
                            // 'max': max_date_month,
                            type: "month",
                            trigger: "click", //添加这一行来处理
                            change: function (value, date, endDate) {
                                question.check_list[15501] = value;
                                if ($(".layui-laydate").length) {
                                    $(".js-date1").val(value);
                                    $(".layui-laydate").remove();
                                }
                            },
                        });

                        // laydate.render({
                        //     elem: '.js-date6',
                        //     // 'max': max_date_month,
                        //     type: 'month',
                        //     trigger: 'click', //添加这一行来处理
                        //     change: function(value, date, endDate) {
                        //         question.check_list[15801] = value;
                        //         if ($(".layui-laydate").length) {
                        //             $(".js-date6").val(value);
                        //             $(".layui-laydate").remove();
                        //         }
                        //         console.log('UI那个该又在');

                        //     }
                        // });

                        laydate.render({
                            elem: ".js-date2",
                            // 'max': max_date_month,
                            type: "month",
                            trigger: "click", //添加这一行来处理
                            change: function (value, date, endDate) {
                                question.check_list[15504] = value;
                                if ($(".layui-laydate").length) {
                                    $(".js-date2").val(value);
                                    $(".layui-laydate").remove();
                                }
                            },
                            done: function (value, date, endDate) {
                                question.check_list[15504] = value;
                            },
                        });
                        laydate.render({
                            elem: ".js-date3",
                            type: "month",
                            trigger: "click", //添加这一行来处理
                            change: function (value, date, endDate) {
                                question.check_list[15507] = value;
                                if ($(".layui-laydate").length) {
                                    $(".js-date3").val(value);
                                    $(".layui-laydate").remove();
                                }
                            },
                            done: function (value, date, endDate) {
                                question.check_list[15507] = value;
                            },
                        });
                        laydate.render({
                            elem: ".js-date4",
                            // 'max': max_date,
                            type: "month",
                            trigger: "click", //添加这一行来处理
                            change: function (value, date, endDate) {
                                question.check_list[15510] = value;

                                if ($(".layui-laydate").length) {
                                    $(".js-date4").val(value);
                                    $(".layui-laydate").remove();
                                }
                            },
                            done: function (value, date, endDate) {
                                question.check_list[15510] = value;
                            },
                        });
                        laydate.render({
                            elem: ".js-date5",
                            type: "month",
                            // 'max': max_date,
                            trigger: "click", //添加这一行来处理
                            change: function (value, date, endDate) {
                                question.check_list[15513] = value;

                                if ($(".layui-laydate").length) {
                                    $(".js-date5").val(value);
                                    $(".layui-laydate").remove();
                                }
                            },
                            done: function (value, date, endDate) {
                                question.check_list[15513] = value;
                            },
                        });
                        laydate.render({
                            elem: ".js-date6",
                            max: max_date,
                            type: "month",
                            trigger: "click", //添加这一行来处理
                            change: function (value, date, endDate) {
                                question.check_list[15801] = value;

                                if ($(".layui-laydate").length) {
                                    $(".js-date6").val(value);
                                    $(".layui-laydate").remove();
                                }
                            },
                            done: function (value, date, endDate) {
                                question.check_list[15801] = value;
                            },
                        });
                        laydate.render({
                            elem: ".js-date7",
                            // 'max': max_date,
                            type: "month",
                            trigger: "click", //添加这一行来处理
                            change: function (value, date, endDate) {
                                question.check_list[15804] = value;
                                if ($(".layui-laydate").length) {
                                    $(".js-date7").val(value);
                                    $(".layui-laydate").remove();
                                }
                            },
                            done: function (value, date, endDate) {
                                question.check_list[15804] = value;
                            },
                        });
                        laydate.render({
                            elem: ".js-date8",
                            // 'max': max_date,
                            type: "month",
                            trigger: "click", //添加这一行来处理
                            change: function (value, date, endDate) {
                                question.check_list[15807] = value;
                                if ($(".layui-laydate").length) {
                                    $(".js-date8").val(value);
                                    $(".layui-laydate").remove();
                                }
                            },
                            done: function (value, date, endDate) {
                                question.check_list[15807] = value;
                            },
                        });
                        laydate.render({
                            elem: ".js-date9",
                            // 'max': max_date,
                            type: "month",
                            trigger: "click", //添加这一行来处理
                            change: function (value, date, endDate) {
                                question.check_list[15810] = value;

                                if ($(".layui-laydate").length) {
                                    $(".js-date9").val(value);
                                    $(".layui-laydate").remove();
                                }
                            },
                            done: function (value, date, endDate) {
                                question.check_list[15810] = value;
                            },
                        });
                        laydate.render({
                            elem: ".js-date10",
                            // 'max': max_date,
                            type: "month",
                            trigger: "click", //添加这一行来处理
                            change: function (value, date, endDate) {
                                question.check_list[15813] = value;

                                if ($(".layui-laydate").length) {
                                    $(".js-date10").val(value);
                                    $(".layui-laydate").remove();
                                }
                            },
                            done: function (value, date, endDate) {
                                question.check_list[15813] = value;
                            },
                        });

                        //单选事件
                        form.on("radio(radio1)", function (data) {
                            console.log({
                                data,
                            });

                            var qid = data.elem.name;
                            if (data.elem.checked) {
                                question[qid][0] = data.value;
                                question[qid][1] = $(this).attr("title");
                                if (qid == 154) {
                                    init154Row(data.value);
                                }
                                if ((qid = 157)) {
                                    init157Row(data.value);
                                }
                            } else {
                                question[qid][0] = 0;
                                question[qid][1] = "";
                                if (qid == 154) {
                                    $(".r154-1").hide();
                                    $(".r154-1 input").val("");
                                    for (var r = 15801; r <= 15815; r++) {
                                        delete question.check_list[r];
                                    }
                                }

                                if ((qid = 157)) {
                                    $(".r157-1").hide();
                                    $(".r157-2").hide();
                                    $(".r157-3").hide();
                                    $(".r157-4").hide();
                                }
                            }
                        });

                        form.on("radio(radio3)", function (data) {
                            var qid = data.elem.name;
                            if (data.elem.checked) {
                                question[qid][0] = data.value;
                                question[qid][1] = $(this).attr("title");
                                if (qid == 160) {
                                    if (
                                        data.value == 16001 ||
                                        data.value == 16002
                                    ) {
                                        $("#huanjieMonth").prop(
                                            "disabled",
                                            false
                                        );
                                        question["huanjie"] =
                                            data.value + "" + "001";
                                    } else {
                                        $("#huanjieMonth").prop(
                                            "disabled",
                                            true
                                        );
                                        $("#huanjieMonth").val("");
                                        question["huanjie"] = "";
                                    }
                                }
                                if (qid == 159) {
                                    if ($(this).val() == 15903) {
                                        $("#15903001-val").prop(
                                            "disabled",
                                            false
                                        );
                                        question["suifang"] = data.value;
                                    } else {
                                        $("#15903001-val").prop(
                                            "disabled",
                                            true
                                        );
                                        $("#15903001-val").val("");
                                        question["suifang"] = "";
                                    }
                                }
                            } else {
                                question[qid][0] = 0;
                                question[qid][1] = "";
                                if (qid == 160) {
                                    if (
                                        data.value == 16001 ||
                                        data.value == 16002
                                    ) {
                                        $("#huanjieMonth").prop(
                                            "disabled",
                                            true
                                        );
                                        $("#huanjieMonth").val("");
                                        question["huanjie"] = "";
                                    }
                                }
                                if (qid == 159) {
                                    if ($(this).val() == 15903) {
                                        $("#15903001-val").prop(
                                            "disabled",
                                            true
                                        );
                                        $("#15903001-val").val("");
                                        question["suifang"] = "";
                                    }
                                }
                            }
                        });

                        //第二类切换，带选项列表
                        form.on("switch(switch2)", function (data) {
                            var qid = $(this).attr("data-qid");
                            if (this.checked) {
                                $("#opn-" + qid).show();
                                question[qid][0] = qid + "01";
                                question[qid][1] = "是";
                            } else {
                                $("#opn-" + qid).hide();
                                question[qid][0] = qid + "02";
                                question[qid][1] = "否";
                            }
                            console.log(question);
                        });
                        //复选选中与否切换
                        form.on("checkbox(check1)", function (data) {
                            var val = $(this).attr("title");
                            var qid2 = data.value;

                            if (this.checked) {
                                question["check_list"][qid2] = val;
                                if (qid2 == 15302) {
                                    //手术治疗
                                    $(".ss-15302").show();
                                }
                                if (qid2 == 15303) {
                                    //放射治疗显示其他信息
                                    $(".fs-15303").show();
                                    $(".ss-15302-2").show();
                                    //判断是否选择手术治疗
                                    var aoperation = document.getElementById('operation');
                                    if (aoperation.checked == true){
                                        console.log('选择手术治疗,不隐藏');
                                    }else{
                                        document.getElementById('bl_bg').style.cssText = "display:none;";
                                    }
                                }
                            } else {
                                if (qid2 == 15302) {
                                    //隐藏手机治疗相关信息
                                    $(".ss-15302").hide();
									if($('.cv-15303').is(':checked')){
									  // $('#bl_bg').show()
									}

                                }
                                if (qid2 == 15303) {
									if(!$('.cv-15302').is(':checked')){
										$(".ss-15302").hide();
										$(".ss-15302-2").hide();
									}
                                  $(".fs-15303").hide();
                                }
                                delete question.check_list[qid2];
                            }
                        });

                        //rowInput输入内容事件
                        $(".js-rowInput").change(function () {
                            aid = $(this).attr("id");
                            val = $(this).val();
                            question.check_list[aid] = val;
                        });

                        // v1.1 信息校验
                        form.verify({
                            other_text: function (value) {
                                if (value.length > 20) {
                                    return "输入内容不能超过20个字";
                                }
                            },
                            other_text_less: function (value) {
                                if (value.length > 10) {
                                    return "输入内容不能超过10个字";
                                }
                            },
                            other_text_max: function (value) {
                                if (value.length > 1001) {
                                    return "输入内容不能超过1000个字";
                                }
                            },
                            other_text_mini: function (value) {
                                if (parseInt(value) >= 10000) {
                                    return "最多只能输入3位数字";
                                }
                                // if (parseInt(value) < 0) {
                                //     return "只能输入正数";
                                // }
                            },
                        });

                        form.on("submit(submit-btn)", function (data) {
                            //$('.add-container').hide();
                            //$('.result-box').show();
                            //判断是否选择手术治疗
                            var aoperation = document.getElementById('operation');
                            if (aoperation.checked == true){
                                //判断选择次数
                                var frequency = document.getElementsByName('154');
                                var j = 0;
                                for(var i = 0;i < frequency.length; i++)
                                {
                                    if(frequency[i].checked==true)
                                    {
                                        var frequencynum = i;
                                    }
                                }
                                var frequency1 = document.getElementById('15501').value;
                                var frequency2 = document.getElementById('15502').value;
                                var frequency3 = document.getElementById('15503').value;
                                var frequency4 = document.getElementById('15504').value;
                                var frequency5 = document.getElementById('15505').value;
                                var frequency6 = document.getElementById('15506').value;
                                var frequency7 = document.getElementById('15507').value;
                                var frequency8 = document.getElementById('15508').value;
                                var frequency9 = document.getElementById('15509').value;
                                var frequency10 = document.getElementById('15510').value;
                                var frequency11 = document.getElementById('15511').value;
                                var frequency12 = document.getElementById('15512').value;
                                var frequency13 = document.getElementById('15513').value;
                                var frequency14 = document.getElementById('15514').value;
                                var frequency15 = document.getElementById('15515').value;
                                if (frequencynum == 0){
                                    //1次,判断非空
                                    if (frequency1 == ''){
                                        layer.msg("请填写手术时间");
                                        return false;
                                    }
                                    if (frequency2 == ''){
                                        layer.msg("请填写手术名称");
                                        return false;
                                    }
                                    if (frequency3 == ''){
                                        layer.msg("请填写手术效果判定");
                                        return false;
                                    }
                                }else if(frequencynum == 1){
                                    //2次,非空判定
                                    if (frequency1 == ''){
                                        layer.msg("请填写手术时间");
                                        return false;
                                    }
                                    if (frequency2 == ''){
                                        layer.msg("请填写手术名称");
                                        return false;
                                    }
                                    if (frequency3 == ''){
                                        layer.msg("请填写手术效果判定");
                                        return false;
                                    }
                                    if (frequency4 == ''){
                                        layer.msg("请填写手术时间");
                                        return false;
                                    }
                                    if (frequency5 == ''){
                                        layer.msg("请填写手术名称");
                                        return false;
                                    }
                                    if (frequency6 == ''){
                                        layer.msg("请填写手术效果判定");
                                        return false;
                                    }
                                }else if(frequencynum == 2){
                                    //3次,非空判定
                                    if (frequency1 == ''){
                                        layer.msg("请填写手术时间");
                                        return false;
                                    }
                                    if (frequency2 == ''){
                                        layer.msg("请填写手术名称");
                                        return false;
                                    }
                                    if (frequency3 == ''){
                                        layer.msg("请填写手术效果判定");
                                        return false;
                                    }
                                    if (frequency4 == ''){
                                        layer.msg("请填写手术时间");
                                        return false;
                                    }
                                    if (frequency5 == ''){
                                        layer.msg("请填写手术名称");
                                        return false;
                                    }
                                    if (frequency6 == ''){
                                        layer.msg("请填写手术效果判定");
                                        return false;
                                    }
                                    if (frequency7 == ''){
                                        layer.msg("请填写手术时间");
                                        return false;
                                    }
                                    if (frequency8 == ''){
                                        layer.msg("请填写手术名称");
                                        return false;
                                    }
                                    if (frequency9 == ''){
                                        layer.msg("请填写手术效果判定");
                                        return false;
                                    }
                                }else if(frequencynum == 3){
                                    //3次以上,非空判定
                                    if (frequency1 == ''){
                                        layer.msg("请填写手术时间");
                                        return false;
                                    }
                                    if (frequency2 == ''){
                                        layer.msg("请填写手术名称");
                                        return false;
                                    }
                                    if (frequency3 == ''){
                                        layer.msg("请填写手术效果判定");
                                        return false;
                                    }
                                    if (frequency4 == ''){
                                        layer.msg("请填写手术时间");
                                        return false;
                                    }
                                    if (frequency5 == ''){
                                        layer.msg("请填写手术名称");
                                        return false;
                                    }
                                    if (frequency6 == ''){
                                        layer.msg("请填写手术效果判定");
                                        return false;
                                    }
                                    if (frequency7 == ''){
                                        layer.msg("请填写手术时间");
                                        return false;
                                    }
                                    if (frequency8 == ''){
                                        layer.msg("请填写手术名称");
                                        return false;
                                    }
                                    if (frequency9 == ''){
                                        layer.msg("请填写手术效果判定");
                                        return false;
                                    }
                                    if (frequency10 == ''){
                                        layer.msg("请填写手术时间");
                                        return false;
                                    }
                                    if (frequency11 == ''){
                                        layer.msg("请填写手术名称");
                                        return false;
                                    }
                                    if (frequency12 == ''){
                                        layer.msg("请填写手术效果判定");
                                        return false;
                                    }
                                    if (frequency13 == ''){
                                        layer.msg("请填写手术时间");
                                        return false;
                                    }
                                    if (frequency14 == ''){
                                        layer.msg("请填写手术名称");
                                        return false;
                                    }
                                    if (frequency15 == ''){
                                        layer.msg("请填写手术效果判定");
                                        return false;
                                    }
                                }else{
                                    layer.msg("请选择手术次数");
                                    return false;
                                }
                            }
                            //判断是否选择放射治疗
                            var radiation = document.getElementById('radiation');
                            if (radiation.checked == true){
                                //判断选择次数
                                var frequencys = document.getElementsByName('157');
                                var j = 0;
                                for(var i = 0;i < frequencys.length; i++)
                                {
                                    if(frequencys[i].checked==true)
                                    {
                                        var frequencynums = i;
                                    }
                                }
                                var frequencys1 = document.getElementById('15801').value;
                                var frequencys2 = document.getElementById('15802').value;
                                var frequencys3 = document.getElementById('15803').value;
                                var frequencys4 = document.getElementById('15804').value;
                                var frequencys5 = document.getElementById('15805').value;
                                var frequencys6 = document.getElementById('15806').value;
                                var frequencys7 = document.getElementById('15807').value;
                                var frequencys8 = document.getElementById('15808').value;
                                var frequencys9 = document.getElementById('15809').value;
                                var frequencys10 = document.getElementById('15810').value;
                                var frequencys11 = document.getElementById('15811').value;
                                var frequencys12 = document.getElementById('15812').value;
                                var frequencys13 = document.getElementById('15813').value;
                                var frequencys14 = document.getElementById('15814').value;
                                var frequencys15 = document.getElementById('15815').value;
                                if (frequencynums == 0){
                                    //1次,判断非空
                                    if (frequencys1 == ''){
                                        layer.msg("请填写手术时间");
                                        return false;
                                    }
                                    if (frequencys2 == ''){
                                        layer.msg("请填写手术名称");
                                        return false;
                                    }
                                    if (frequencys3 == ''){
                                        layer.msg("请填写手术效果判定");
                                        return false;
                                    }
                                }else if(frequencynums == 1){
                                    //2次,非空判定
                                    if (frequencys1 == ''){
                                        layer.msg("请填写手术时间");
                                        return false;
                                    }
                                    if (frequencys2 == ''){
                                        layer.msg("请填写手术名称");
                                        return false;
                                    }
                                    if (frequencys3 == ''){
                                        layer.msg("请填写手术效果判定");
                                        return false;
                                    }
                                    if (frequencys4 == ''){
                                        layer.msg("请填写手术时间");
                                        return false;
                                    }
                                    if (frequencys5 == ''){
                                        layer.msg("请填写手术名称");
                                        return false;
                                    }
                                    if (frequencys6 == ''){
                                        layer.msg("请填写手术效果判定");
                                        return false;
                                    }
                                }else if(frequencynums == 2){
                                    //3次,非空判定
                                    if (frequencys1 == ''){
                                        layer.msg("请填写手术时间");
                                        return false;
                                    }
                                    if (frequencys2 == ''){
                                        layer.msg("请填写手术名称");
                                        return false;
                                    }
                                    if (frequencys3 == ''){
                                        layer.msg("请填写手术效果判定");
                                        return false;
                                    }
                                    if (frequencys4 == ''){
                                        layer.msg("请填写手术时间");
                                        return false;
                                    }
                                    if (frequencys5 == ''){
                                        layer.msg("请填写手术名称");
                                        return false;
                                    }
                                    if (frequencys6 == ''){
                                        layer.msg("请填写手术效果判定");
                                        return false;
                                    }
                                    if (frequencys7 == ''){
                                        layer.msg("请填写手术时间");
                                        return false;
                                    }
                                    if (frequencys8 == ''){
                                        layer.msg("请填写手术名称");
                                        return false;
                                    }
                                    if (frequencys9 == ''){
                                        layer.msg("请填写手术效果判定");
                                        return false;
                                    }
                                }else if(frequencynums == 3){
                                    //3次以上,非空判定
                                    if (frequencys1 == ''){
                                        layer.msg("请填写手术时间");
                                        return false;
                                    }
                                    if (frequencys2 == ''){
                                        layer.msg("请填写手术名称");
                                        return false;
                                    }
                                    if (frequencys3 == ''){
                                        layer.msg("请填写手术效果判定");
                                        return false;
                                    }
                                    if (frequencys4 == ''){
                                        layer.msg("请填写手术时间");
                                        return false;
                                    }
                                    if (frequencys5 == ''){
                                        layer.msg("请填写手术名称");
                                        return false;
                                    }
                                    if (frequencys6 == ''){
                                        layer.msg("请填写手术效果判定");
                                        return false;
                                    }
                                    if (frequencys7 == ''){
                                        layer.msg("请填写手术时间");
                                        return false;
                                    }
                                    if (frequencys8 == ''){
                                        layer.msg("请填写手术名称");
                                        return false;
                                    }
                                    if (frequencys9 == ''){
                                        layer.msg("请填写手术效果判定");
                                        return false;
                                    }
                                    if (frequencys10 == ''){
                                        layer.msg("请填写手术时间");
                                        return false;
                                    }
                                    if (frequencys11 == ''){
                                        layer.msg("请填写手术名称");
                                        return false;
                                    }
                                    if (frequencys12 == ''){
                                        layer.msg("请填写手术效果判定");
                                        return false;
                                    }
                                    if (frequencys13 == ''){
                                        layer.msg("请填写手术时间");
                                        return false;
                                    }
                                    if (frequencys14 == ''){
                                        layer.msg("请填写手术名称");
                                        return false;
                                    }
                                    if (frequencys15 == ''){
                                        layer.msg("请填写手术效果判定");
                                        return false;
                                    }
                                }else{
                                    layer.msg("请选择放射治疗次数");
                                    return false;
                                }
                            }
                            var jumpType = $(this).attr("data-type");
                            var chapterId = 1601;
                            var visitLevel = 1;
                            var params = {
                                hosp_id: getLocalStorage("hosp_id"),
                                dept_id: getLocalStorage("dept_id"),
                                user_id: getLocalStorage("patient_id"),
                                doc_id: getLocalStorage("doc_id"),
                                visit_level: 1,
                                template_id: templateID,
                                terminal_flg: 0,
                                data: [
                                    {
                                        visit_level: 1,
                                        user_id: getLocalStorage("patient_id"),
                                        doc_id: getLocalStorage("doc_id"),
                                        terminal_flg: "0",
                                        template_id: templateID,
                                        datasource: "2",
                                        answer: [],
                                    },
                                ],
                            };
                            var answer = [];

                            var checkBoxHas15302 = false;
                            var checkBoxHas15303 = false;
                            $.each(question.check_list, function (qid2, item) {
                                if (qid2 == 15302) checkBoxHas15302 = true;
                                if (qid2 == 15303) checkBoxHas15303 = true;
                            });
                            if (!checkBoxHas15302) {
                                //2.b 手术信息
                                for (var i = 15501; i <= 15515; i++) {
                                    question.check_list[i] = "";
                                }
                            }
                            // harvey
                            if (!checkBoxHas15303) {
                                //2.b 手术信息
                                for (var i = 15801; i <= 15815; i++) {
                                    question.check_list[i] = "";
                                }
                            }
                            //第二类多选

                            $.each(question.check_list, function (qid2, item) {
                                qid = parseInt(parseInt(qid2) / 100);
                                console.log("a=>", question.check_list);

                                answer.push({
                                    chapter_id: chapterId,
                                    question_id: qid,
                                    subquestion_id: qid,
                                    answer_id: qid2,
                                    answer_name: item,
                                    visit_level: visitLevel,
                                });
                            });
                            if (checkBoxHas15302 == false) {
                                //2.a 15402手术次数
                                question[154][0] = 0;
                                question[154][1] = "";

                                //3.已上传的图片
                                question[156] = [];
                            }
                            if (checkBoxHas15303 == false) {
                                //4. 垂体疾病放射治疗情况
                                question[157][0] = 0;
                                question[157][1] = "";
                            }

                            $.each(question, function (qid, item) {
                                if (item[2] == "s1") {
                                    //单选或输入类
                                    if (item[0] != 0) {
                                        answer.push({
                                            chapter_id: chapterId,
                                            question_id: qid,
                                            subquestion_id: qid,
                                            answer_id: question[qid][0],
                                            answer_name: question[qid][1],
                                            visit_level: visitLevel,
                                        });
                                    }
                                }
                            });

                            //缓解
                            if (
                                question[160][0] == 16001 ||
                                question[160][0] == 16002
                            ) {
                                answer.push({
                                    chapter_id: chapterId,
                                    question_id: 160,
                                    subquestion_id: question["huanjie"],
                                    answer_id: question["huanjie"],
                                    answer_name: $("#huanjieMonth").val(),
                                    visit_level: visitLevel,
                                });
                            }

                            if (question["suifang"] == 15903) {
                                answer.push({
                                    chapter_id: chapterId,
                                    question_id: 159,
                                    subquestion_id: 15903001,
                                    answer_id: "15903001",
                                    answer_name: $("#15903001-val").val(),
                                    visit_level: visitLevel,
                                });
                            }

                            //上传图片处理
                            if (question[156].length > 0) {
                                answer.push({
                                    chapter_id: chapterId,
                                    question_id: 156,
                                    subquestion_id: 156,
                                    answer_id: "156",
                                    answer_name: question[156].toString(),
                                    visit_level: visitLevel,
                                });
                            }
                            // v1.1 病理报告文本
                            // if(question['bingli'] == 15601001){
                            //     answer.push({
                            //         'chapter_id':chapterId,
                            //         'question_id':156,
                            //         'subquestion_id':15601001,
                            //         'answer_id':'15601001',
                            //         'answer_name':$("#15601001-val").val(),
                            //         'visit_level':visitLevel
                            //     });
                            // }

                            if ($("#15601001-val").val() != "") {
                                answer.push({
                                    chapter_id: chapterId,
                                    question_id: 156,
                                    subquestion_id: 15601001,
                                    answer_id: "15601001",
                                    answer_name: $("#15601001-val").val(),
                                    visit_level: visitLevel,
                                });
                            }

                            console.log(answer);

                            params.data[0].answer = answer;
                            var jumpType = $(this).attr("data-type");
                            ajax_post(configUrl.qssInfo, params, function (
                                res
                            ) {
                                //console.log(res);
                                if (res.status == "0") {
                                    layer.msg(
                                        "操作成功",
                                        {
                                            icon: 6,
                                            time: 1000,
                                        },
                                        function () {
                                            if (jumpType == 0) {
                                                //不跳转
                                                window.location.reload();
                                            } else {
                                                //跳转
                                                window.location.href =
                                                    "qss7.html";
                                            }
                                        }
                                    );
                                } else {
                                    layer.msg(res.msg, {
                                        icon: 5,
                                    });
                                }
                            });
                            return false;
                            alert(6);

                            //倒计时2s进度条变成100%
                            /*var n = 0, timer = setInterval(function () {
                    n = n + 50;
                    if (n > 100) {
                        n = 100;
                        clearInterval(timer);
                        layer.msg('生成成功', {icon: 1, time: 1000}, function () {
                            console.log('tiaozhuan')
                        });
                    }
                    element.progress('result-progress', n + '%');
                    console.log(n);
                }, 300 + Math.random() * 1000);*/
                        });
                    }
                );
        });

    </script>
</html>
